feat(openfeature): support long variable evaluation - #196
Merged
Conversation
jonathannorris
marked this pull request as ready for review
July 30, 2026 15:46
jonathannorris
requested review from
JamieSinn,
Copilot,
kaushalkapasi and
toddbaert
July 30, 2026 15:46
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the DevCycle OpenFeature provider integration to support Long evaluations by upgrading the OpenFeature Java SDK to a version that includes FeatureProvider#getLongEvaluation, and adds regression tests to validate the SDK default narrowing behavior for Double-backed numbers.
Changes:
- Bump
dev.openfeature:sdkfrom1.14.2to1.22.0. - Add
DevCycleProviderTestcoverage forgetLongEvaluation(beyond-int range success, fractional mismatch, and unsafe-range mismatch).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
build.gradle |
Bumps OpenFeature SDK dependency to 1.22.0 to enable long evaluation support. |
src/test/java/com/devcycle/sdk/server/openfeature/DevCycleProviderTest.java |
Adds tests that exercise the OpenFeature SDK default getLongEvaluation behavior against DevCycle’s Double-backed numeric variables. |
Comments suppressed due to low confidence (1)
src/test/java/com/devcycle/sdk/server/openfeature/DevCycleProviderTest.java:223
- This comment attributes the mismatch to precision loss, but 2^53 is exactly representable as a double. The reason it should be rejected is that it is outside the SDK’s declared safe-integer range (max 2^53−1). Updating the wording makes the test rationale accurate.
// 2^53 exceeds the double safe-integer range, so it cannot be narrowed to a long without precision loss.
Double variableValue = 9_007_199_254_740_992.0;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
toddbaert
approved these changes
Jul 30, 2026
toddbaert
left a comment
There was a problem hiding this comment.
is there official docs about the 2^53 limitation?
JamieSinn
approved these changes
Aug 2, 2026
jonathannorris
enabled auto-merge (squash)
August 6, 2026 19:24
jonathannorris
force-pushed
the
worktree-of-long-support
branch
from
August 6, 2026 19:25
028305c to
287807d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Longevaluation support by upgrading the OpenFeature SDK to1.22.0.Why no custom override
DevCycle stores numbers as
Double, so the SDK default safely converts them tolongand returnsTYPE_MISMATCHfor fractional or out-of-range values. A custom override would add no capability and could remove these safeguards.